<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Restoring One or More Tables in TiDB Backup Resources">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000001792504746.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20240608">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="EN-US_TOPIC_0000001792504762">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Restoring One or More Tables in TiDB Backup Resources</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="EN-US_TOPIC_0000001792504762"></a><a name="EN-US_TOPIC_0000001792504762"></a>
  <h1 class="topictitle1">Restoring One or More Tables in TiDB Backup Resources</h1>
  <div>
   <p>This section describes how to restore one or multiple tables in a TiDB backup resource.</p>
   <div class="section">
    <h4 class="sectiontitle">Context</h4>
    <p>Data can be restored to the original or a new location using a backup copy and replication copy of a cluster or database. Note that data cannot be restored to the original location when using a replication copy.</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Prerequisites</h4>
    <ul id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792504770_ul132661420141115">
     <li id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792504770_li762383391617">Before the restoration, ensure that the restoration target location is correct.</li>
     <li id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792504770_li7712113644310">Before the restoration, ensure that the remaining space of the data directory at the target location for restoration is greater than the size of the copy used for restoration before reduction.</li>
     <li id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792504770_li5441111618120">Before executing the restoration job, disable the TiDB log backup function. After the restoration job is complete, enable the function again. For details about how to enable and disable the function, see <a href="en-us_topic_0000001792504734.html">Enabling or Disabling the Log Backup Function in the Production Environment</a>.</li>
     <li id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792504770_li16230658087">The clock source configuration of clusters must be the same.</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Procedure</h4>
    <ol>
     <li><span>Choose <span class="uicontrol" id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792345026_en-us_topic_0000001839142377_uicontrol548619473589"><b><span id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792345026_en-us_topic_0000001839142377_text44861447115812"><strong>Explore</strong></span> &gt; <span id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792345026_en-us_topic_0000001839142377_text2048614765813"><strong>Copy Data</strong></span> &gt; <span id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792345026_en-us_topic_0000001839142377_text163101122194918"><strong>Databases</strong></span> &gt; TiDB</b></span>.</span></li>
     <li><span>You can search for copies by TiDB backup resource or copy. This section describes how to search for copies by resource.</span><p></p><p>On the <strong>Resources</strong> tab page, locate the backup resource to be restored based on the backup resource name and click the backup resource name.</p>
      <div class="note">
       <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
       <div class="notebody">
        <p>Table-level restoration is available only for copies whose resource type is cluster or database. For details about the copy types that support table-level restoration, see <a href="en-us_topic_0000001792344994.html#EN-US_TOPIC_0000001792344994__table49816194482">en-us_topic_0000001792344994.html#EN-US_TOPIC_0000001792344994__table49816194482</a>.</p>
       </div>
      </div> <p></p></li>
     <li><span>Click the <span class="uicontrol"><b><span><strong>Copy Data</strong></span></b></span> tab and select the year, month, and day in sequence to locate the copy.</span><p></p><p>If <span><img src="en-us_image_0000001839224157.png"></span> is displayed below a month or day, a copy is generated in that month or day.</p> <p></p></li>
     <li><span>Click <span><img src="en-us_image_0000001839144201.png"></span>. Choose <span class="uicontrol"><b><span><strong>More</strong></span> &gt; <span><strong>Table-level Restoration</strong></span></b></span> in the row where the copy resides.</span></li>
     <li><span>In the left pane of the <span class="uicontrol"><b><span><strong>Table-level Restoration</strong></span></b></span> page, select the table to be restored.</span></li>
     <li><span>On the right of the <span class="uicontrol"><b><span><strong>Table-level Restoration</strong></span></b></span> page, click <span class="uicontrol"><b><span><strong>Please select</strong></span></b></span>, select the target location to which you want to restore data and click <span class="uicontrol"><b>OK</b></span>.</span><p></p><p><a href="#EN-US_TOPIC_0000001792504762__table194961441141219">Table 1</a> describes the related parameters.</p>
      <div class="tablenoborder">
       <a name="EN-US_TOPIC_0000001792504762__table194961441141219"></a><a name="table194961441141219"></a>
       <table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001792504762__table194961441141219" frame="border" border="1" rules="all">
        <caption>
         <b>Table 1 </b>Restoring TiDB tables
        </caption>
        <colgroup>
         <col style="width:32.019999999999996%">
         <col style="width:67.97999999999999%">
        </colgroup>
        <thead align="left">
         <tr>
          <th align="left" class="cellrowborder" valign="top" width="32.019999999999996%" id="mcps1.3.4.2.6.2.2.2.3.1.1"><p>Parameter</p></th>
          <th align="left" class="cellrowborder" valign="top" width="67.97999999999999%" id="mcps1.3.4.2.6.2.2.2.3.1.2"><p>Description</p></th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.6.2.2.2.3.1.1 "><p><span><strong>Restore To</strong></span></p></td>
          <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.6.2.2.2.3.1.2 "><p>Select either <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span> or <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p></td>
         </tr>
         <tr>
          <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.6.2.2.2.3.1.1 "><p><span><strong>Target Cluster</strong></span></p></td>
          <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.6.2.2.2.3.1.2 "><p>If you choose to restore to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>, choose the target TiDB cluster.</p>
           <div class="note">
            <span class="notetitle"> NOTE: </span>
            <div class="notebody">
             <ul>
              <li>Restoring data from a database of a later version to a database of an earlier version may fail. Query TiDB official documents to check whether the database version is compatible.</li>
             </ul>
            </div>
           </div></td>
         </tr>
         <tr>
          <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.6.2.2.2.3.1.1 "><p><strong>Delete Same-Name Table</strong></p></td>
          <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.6.2.2.2.3.1.2 "><p>Use this parameter to decide whether to delete tables with the same names. When this option is enabled during table-level restoration, the ProtectAgent host deletes tables with the same names as those in the original copy by default.</p>
           <div class="note">
            <span class="notetitle"> NOTE: </span>
            <div class="notebody">
             <p id="EN-US_TOPIC_0000001792504762__en-us_topic_0000001792504770_p147141414193715">If you do not delete tables with the same names, the restoration will fail. Exercise caution when performing this operation.</p>
            </div>
           </div></td>
         </tr>
        </tbody>
       </table>
      </div> <p></p></li>
     <li><span>Click <span class="uicontrol"><b>OK</b></span>.</span></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000001792504746.html">Restoration</a>
    </div>
   </div>
  </div>
 </body>
</html>